<?php
/**
 * 简单导出类.
 * 
 * @author 莫 念  
 * @version 1.0
 * @package main
 */


//example
//ini_set("display_errors", "On");
//error_reporting(E_ALL | E_STRICT);

require('lib/Exprot.class.php');
require('lib/Chinese.class.php');  //编码类。。

$head = array('用户名称','添加时间');
$filename = '导出数据-'.date("YmdHis");
$export = new Exprot(array('type' => 'csv'));
$export->downloadHeader($filename,'text/comma-separated-values');
$export->exprotHead($head);

$list = array('小名','小明','小红','小花','小华');
foreach($list as $k => $v){
	$_data = array();
	$_data[] = $v;
	$_data[] = time();
	$export->exprotData($_data);
}
$export->exprotFoot();

